package nc.vo.hljt.h00004;

import nc.vo.pub.AggregatedValueObject;
import nc.vo.pub.CircularlyAccessibleValueObject;

public class Ret55VO extends AggregatedValueObject {

	public Ret55HeadVO headvo;

	public Ret55BodyVO[] bodyvos;

	public Ret55VO() {
		super();
	}

	public CircularlyAccessibleValueObject[] getChildrenVO() {
		return bodyvos;
	}

	public CircularlyAccessibleValueObject getParentVO() {
		return headvo;
	}

	public void setChildrenVO(CircularlyAccessibleValueObject[] children) {
		bodyvos = (Ret55BodyVO[]) children;
	}

	public void setParentVO(CircularlyAccessibleValueObject parent) {
		headvo = (Ret55HeadVO) parent;
	}

	public Ret55BodyVO[] getBodyVOs() {
		return bodyvos;
	}

	public Ret55HeadVO getHeadVO() {
		return headvo;
	}

	public void setBodyVO(int row, Ret55BodyVO vo) {
		if (bodyvos != null && row >= 0 && row < bodyvos.length)
			bodyvos[row] = vo;
	}

	public void setBodyValue(int row, String sKey, Object oValue) {
		if (bodyvos != null && row >= 0 && row < bodyvos.length
				&& bodyvos[row] != null)
			bodyvos[row].setAttributeValue(sKey, oValue);
	}

	public void setHeadValue(String sKey, Object oValue) {
		if (headvo != null)
			headvo.setAttributeValue(sKey, oValue);
	}

	public Object getBodyValue(int row, String sKey) {
		if (bodyvos != null && row >= 0 && row < bodyvos.length
				&& bodyvos[row] != null)
			return bodyvos[row].getAttributeValue(sKey);
		return null;
	}

	public Object getHeadValue(String sKey) {
		if (headvo != null)
			return headvo.getAttributeValue(sKey);
		return null;
	}

}
